package myky.com.doctorapp.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.facebook.drawee.view.SimpleDraweeView
import com.github.nukc.stateview.Constant
import myky.com.doctorapp.R
import myky.com.doctorapp.api.Address
import myky.com.doctorapp.entity.TeamEntity
import myky.com.doctorapp.utils.UriUtils

class TeamInfoAdapter(datas: List<TeamEntity.DataEntity>) : BaseQuickAdapter<TeamEntity.DataEntity, BaseViewHolder>(R.layout.item_expand_team_item, datas) {
    override fun convert(helper: BaseViewHolder, item: TeamEntity.DataEntity) {

        val simpleDraweeView = helper.getView<SimpleDraweeView>(R.id.item_team_icon)

        simpleDraweeView.setImageURI(UriUtils.getUriInstance().getUri(Constant.ONLINEPIC, Address.IMAGE +item.photo))

        helper.setText(R.id.item_team_name, item.allname)

        helper.setText(R.id.item_team_goodAt, item.specialty)

        helper.addOnClickListener(R.id.item_rootview)

    }
}